﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Automobile.service.BLL;
using Automobile.service.Model;

namespace Automobile.service.UI.Handler
{
    /// <summary>
    /// PurchaseIntoSearch 的摘要说明
    /// </summary>
    public class PurchaseIntoSearch : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            PurchaseBLL bll = new PurchaseBLL();
            string Product_Modelspe = context.Request["Product_Modelspe"];
            List<Product> list = bll.SearchProductByModelspe(Product_Modelspe);
            
            context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(list));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}